import request from '@/utils/request'

// 查询客户信息列表
export function listInfo(query) {
  return request({
    url: '/system/info/list',
    method: 'get',
    params: query
  })
}

// 查询客户信息详细
export function getInfo(customerId) {
  return request({
    url: '/system/info/' + customerId,
    method: 'get'
  })
}
// 根据手机号获取客户ID
export function getCustomerId(phoneNum) {
  return request({
    url: '/system/info/getId/' + phoneNum,
    method: 'get'
  })
}

// 新增客户信息
export function addInfo(data) {
  return request({
    url: '/system/info',
    method: 'post',
    data: data
  })
}

// 新增客户预约信息
export function submitYyxx(data) {
  return request({
    url: '/system/customer_appointments',
    method: 'post',
    data: data
  })
}
// 是否确认提交预约申请
export function make_sure_submit(data) {
  return request({
    url: '/system/customer_appointments/make_sure_submit',
    method: 'post',
    data: data
  })
}


// 修改客户信息
export function updateInfo(data) {
  return request({
    url: '/system/info',
    method: 'put',
    data: data
  })
}

// 删除客户信息
export function delInfo(customerId) {
  return request({
    url: '/system/info/' + customerId,
    method: 'delete'
  })
}
